
<script language="javascript" type="text/javascript" src="/assets/My97DatePicker/jquery-1.8.2.js"></script>
<script language="javascript" type="text/javascript" src="/assets/libs/fastadmin-layer/dist/layer.js"></script>
<div class="content">
    <div style="padding: 0 10px;font-size: 14px;height: 40px;line-height: 40px;">
        <a href="/admin/product/index">产品列表</a>
    </div>
<div class="panel panel-default panel-intro">
    <div class="panel-body">
        <div id="" class="tab-content">
            <div class="tab-pane fade active in" id="one">
                <div class="widget-body no-padding">
                    <div class="bootstrap-table">
                        <div class="fixed-table-toolbar">
                            <div class="bs-bars pull-left">

                            </div>
                                <table  class="table table-striped table-bordered table-hover table-nowrap" data-operate-edit="1" data-operate-del="1" width="100%" border="1">
                                    <thead>
                                    <tr>
                                        <th style="text-align: center; vertical-align: middle;width:4.5%;" data-field="id">
                                            <div class="th-inner ">排序</div>
                                            <div class="fht-cell"></div>
                                        </th>
                                        <th style="text-align: center; vertical-align: middle;width:4.5%;" data-field="id">
                                            <div class="th-inner "></div>
                                            <div class="fht-cell"></div>
                                        </th>
                                        <th style="text-align: center; vertical-align: middle;width:4.5%;" data-field="id">
                                            <div class="th-inner ">行程天数</div>
                                            <div class="fht-cell"></div>
                                        </th>
                                        <th style="text-align: center; vertical-align: middle;width:4.5%;" data-field="info_type">
                                            <div class="th-inner ">标题</div>
                                            <div class="fht-cell"></div>
                                        </th>

                                    </tr>
                                    </thead>
                                    <tbody data-listidx="0">
                                    {volist name="list" id="vo"}
                                    <tr data-index="0" onclick="">
                                        <td style="text-align: center; vertical-align: middle; ">
                                            <input type="number" name="day_no"  infoid="{$vo['id']}" value="{$vo.day_no}" min="1" style="width:40px;" no="main"/>
                                        </td>
                                        <td style="text-align: center; vertical-align: middle; ">
                                        </td>
                                        <td style="text-align: center; vertical-align: middle; ">
                                           第{$vo.day_no}天
                                        </td>

                                        <td style="text-align: left; vertical-align: middle; ">
                                          {$vo.titlearr}
                                        </td>
                                    </tr>

                                    <form method="post" action="">
                                        {volist name="$vo['sence']" id="v1"}
                                        <tr data-index="0" onclick="">
                                            <td style="text-align: center; vertical-align: middle; ">
                                            </td>
                                            <td style="text-align: center; vertical-align: middle; ">
                                                <input type="number" name="{$v1.id}"   value="{$v1.sort}" min="0" style="width:40px;"/>
                                            </td>
                                            <td style="text-align: center; vertical-align: middle; ">
                                            </td>
                                            <td style="text-align: left; vertical-align: middle; ">
                                              &nbsp;&nbsp;&nbsp;&nbsp;|--------{$v1.title}
                                            </td>
                                        </tr>
                                        {/volist}
                                        {if condition="$vo.count gt 0"}
                                        <tr>
                                            <td colspan="4" style="padding-left:422px; ">
                                                <input type="submit" value="排序" class="group_btn" />
                                            </td>
                                        </tr>
                                        {/if}
                                    </form>


                                    {/volist}

                                    </tbody>
                                    <tr>
                                       <td colspan="4" style="padding-left:125px; ">
                                           <button onclick="fatherSub('{$p_id}','{$package_id}');">排序</button>
                                       </td>
                                   </tr>
                                </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</div>

<form id="mainorder" action="/admin/product/route_day_sort" method="post">

</form>




<script>

    function fatherSub(p_id,package_id){
        var inputarr=$("input[no='main']");
        var inputStr="";
        for(var i=0;i<inputarr.length;i++){
            var obj=$(inputarr[i]);
           var  input1="<input type='hidden' name='"+obj.attr('infoid')+"' value='"+obj.val()+"' min='1'/>";
            inputStr=inputStr+input1;
        }
        var input2="<input name='p_id' value='"+p_id+"' type='hidden'/>";
        var input3="<input name='package_id' value='"+package_id+"' type='hidden'/>";
        inputStr=inputStr+input2+input3;
        $("#mainorder").html(inputStr);
        $("#mainorder").submit();
    }

</script>






